#include <string.h>

size_t strcspn( const char * string, const char * control ) {
  register size_t count = 0;
  register char ch;
  while( ch = *string ) {
    if( strchr( control, ch ) ) {
      break;
    } else {
      count++;
    }
    string++;
  }
  return count;
}
